﻿Public Class f_agenda
    Dim c As New Controlador

    Private Sub f_agenda_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        c.muestra_agenda()
        dg_agenda.Columns(1).HeaderText = "Nombre"
        dg_agenda.Columns(2).HeaderText = "Telefono"
        dg_agenda.Columns(3).HeaderText = "Direccion"
        dg_agenda.Columns(4).HeaderText = "Email"
    End Sub

    Private Sub tb_b_nombre_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_nombre.TextChanged
        c.buscar_agenda()
    End Sub

    Private Sub tb_b_telefono_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_telefono.TextChanged
        c.buscar_agenda()
    End Sub

    Private Sub tb_b_apellidos_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tb_b_direccion.TextChanged
        c.buscar_agenda()
    End Sub
End Class